import request from "@/util/request";

export function selectAllLabel(){
    return request({
        url: '/api/sys/dev/devicelable',
        method: "get",
    })
}

export function getDevicePic(deviceSn){
    return request({
        url: '/api/sys/dev/getDevicePic/'+deviceSn,
        method: "get",
    })
}

export function selectAllDevice(data){
    return request({
        url: '/api/sys/dev/listwhere',
        method: "post",
        data:data
    })
}
export function getChannelNameByChannelId(data){
    return request({
        url: '/api/sys/dev/getChannelNameByChannelId',
        method: "post",
        data:data
    })
}

export function selectDeviceTree(){
    return request({
        url: '/api/sys/dev/listByDir',
        method: "get",
    })
}

export function devPlayer(devicesn){
    return request({
        url: '/api/sip/player/'+devicesn,
        method: "get",
    })
}

export function devNotPlayer(devicesn){
    return request({
        url: '/api/sip/notPlayer/'+devicesn,
        method: "get",
    })
}

export function deleteDevice(data){
    return request({
        url: '/api/sys/dev/dels',
        method: "post",
        data:data
    })
}

export function getOneDevice(data){
    return request({
        url: '/api/sys/dev/getOne',
        method: "post",
        data:data
    })
}

export function update(data){
    return request({
        url: '/api/sys/dev/update',
        method: "post",
        data:data
    })
}
export function addDevice(data){
    return request({
        url: '/api/sys/dev/add',
        method: "post",
        data:data
    })
}
